package tech.aistar.mapper.foster;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import tech.aistar.entity.foster.CatComment;

import java.util.List;

public interface CatCommentMapper {

    @Insert("insert into cat_comment(cat_id,user_id,content,state,prase_count,create_time) " +
            "values(#{catId},#{userId},#{content},#{state},#{praseCount},#{createTime})")
    void addComment(CatComment catComment);


    @Select("select * from cat_comment where cat_id = #{catId}")
    List<CatComment> findByCatId(Integer catId);


}
